﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.SessionState;

namespace System.Web
{
    public static class SessionExt
    {
        public static T Get<T>(this HttpSessionState session, string key)
        {
            return (T) session[key];
        }

        public static bool IsExist(this HttpSessionState session, string key)
        {
            return session[key] != null;
        }
    }
}
